package com.element.oauth2.resource.filter;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @auther WuJun.Zhang
 * @date 2022/3/22 下午6:51
 */
@Configuration
public class GlobalSecurityFilter implements WebMvcConfigurer {

    @Resource
    private SecurityHandlerInterceptor securityHandlerInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(securityHandlerInterceptor).addPathPatterns("/**");
    }
}
